*Suggestion: Do author order by alphabetical surname.
Title: This Template is further to the briefing Please do alphabetical order by surname.
Choose from: Ageing Society / Clean Growth / AI and Data Economy / Future of Mobility
Stakeholder: Whose call is addressing this issue? If you say government, be specific about which department. If you say industry, say specifically which sector. Ideally also state in one sentence why.
How is your analysis related to your theme? What is your research question? If you need to cite for context, don’t waste time on bibliography, add an html link.
#USe tools as you need to.
#Some in the teams has experience running pythong with R if you are more comfy with that.
#Ploty is nice to use, but screenshot from excell with do too.
library(plotly)
#library(circlize)
library(knitr)
library(geojsonio)
library(sp)
library(tmap)
Datasets you used to approach this problem.
What data is available to measure progress on your problem? See Zara’s notebook from the first day. Provide tables or figures from these datasets that tell us something about your challenge.
Suggestion: Do a broadsweep of the situation first.
x = c("Stage 1","Stage 2","Stage 3","Stage 4", "Stage 5")
y = c("15","10","3","17","5")
p <- plot_ly(y=y, x=x, histfunc='sum', type = "histogram") %>%
layout(
title = "Bogus Buiding Cycle Descriptive Stat",
yaxis=list(type='linear'))
p
Source: Caveat to keep in mind: Reported by Bonnie once, August 2019.
Suggestion: Then get specific with analysis and modelling
#Feel free to use downloaded data.
#Opening csvs: http://rprogramming.net/read-csv-in-r/
#Loading excels: https://www.rdocumentation.org/packages/openxlsx/versions/4.1.0.1/topics/read.xlsx
regions_json <- geojson_read("https://opendata.arcgis.com/datasets/8d3a9e6e7bd445e2bdcc26cdf007eac7_1.geojson", what = "sp")
t_wu02Ew <- read.csv(file = "https://www.nomisweb.co.uk/api/v01/dataset/NM_1206_1.data.csv?date=latest&usual_residence=2013265921...2013265930&place_of_work=2013265921...2013265930&age=0...6&measures=20100", header=TRUE)
reg_var <- xtabs(OBS_VALUE ~ USUAL_RESIDENCE_CODE + AGE_NAME, data=t_wu02Ew)
reg_var <- as.data.frame.matrix(reg_var)
reg_var <- reg_var[1]
names(reg_var) <- "Relevant Stuff"
#This from Bonnie's Tutorial
#More tmap power here: https://cran.r-project.org/web/packages/tmap/vignettes/tmap-getstarted.html
regions_json@data <- merge(regions_json@data, reg_var, by.x= "rgn15cd", by.y=0 )
tmap_mode("view")
## tmap mode set to interactive viewing
tm_shape(regions_json) + tm_polygons(col="Relevant Stuff")
## Linking to GEOS 3.6.1, GDAL 2.2.3, PROJ 4.9.3